Let mouse wheel zoom snap to view resolution levels - #7210
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
66c7420 to
b5c8c5d
Compare
| showFullExtent: true, | ||
| padding: [20, 20, 20, 20] | ||
| padding: [20, 20, 20, 20], | ||
| constrainResolution: true |
There was a problem hiding this comment.
I tested this and did not notice a real difference with regard to the necessary mouse scrolls. Setting zoomFactor to 1.3 had more effect on the aspects @matthias-ronge seems to talk about in the issue.
There was a problem hiding this comment.
I tested this and did not notice a real difference with regard to the necessary mouse scrolls. Setting
zoomFactorto 1.3 had more effect on the aspects @matthias-ronge seems to talk about in the issue.
Really? That's interesting - and exactly the opposite of what I have observed!
Zooming 10 "ticks" in the current main branch looks like this:
issue-4244-main.mov
Zooming 10 "ticks" with zoomFactor: 1.3:
issue-4244-zoom-factor-1-3.mov
Zooming 10 "ticks" with constrainResolution: true:
issue-4244-constrain-resolution.mov
I am using Firefox, version 154 on MacOS 26.6.3 (Tahoe), btw.
@BartChris maybe have to reload your browsers cache to see the real difference with using contrainResolution?
752a0fe to
e56d750
Compare
oliver-stoehr
left a comment
There was a problem hiding this comment.
Works fine with Chrome, Firefox, Edge and Safari (macOS).
|
I will try to check if i just made a setup error. You are on MacOS? Are you using mousewheel or touchpad? |
I am using the mouse wheel, @oliver-stoehr is probably using the touchpad, I guess. |
|
Yes, I'm using macOS with touchpad. |
e56d750 to
d9bab33
Compare
|
Hmm, both of you can confirm an improvement, so this is strange. I am on Ubuntu Linux and what makes the difference there is setting to |
|
I know that Firefox at least has an option called "Use smooth scrolling". I had disabled this as I want a fast scrolling. Maybe this setting has some kind of influence. I can try this changes tomorrow. |
I think that's a good idea to cover all bases. I will add both settings and check whether it has any adverse effects on how the zoom feature works for me. Maybe you can do the same for your setup and confirm that it works for you, too. |
|
There seems to be some device specific stuff going on, especially in OpenLayers version 6 which we are appearantly using: |
|
Setting it to to 1.2 is already good enough for me scroll_1_2_new.mp4compared to main (1.1) scroll_1_1.mp4 |
And that is with setting |
Yes, Edit: scroll_1_2_constrain.mp4Changing only constrain_1_1.mp4Edit: Given the evidence from only my machine i would vote for |
|
For me, zooming is a bit slow in the current main branch, but still usable. I would call it "precise". It is definitely way faster than @solth video. It looks to be the same as @BartChris video. Increasing zoomFactor to 1.2 would be an improvement for my devices (Fedora, Windows, Firefox, Chrome with basic Logitech Mouse). Looking at the documentation of OpenLayers, the purpose of the setting I think adjusting the |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Sounds like a good plan for the future. But I take it that you don't opose merging the current pull request as it is as a first step then? This could also be backported to |
I am not opposed. Hopefully, this PR should improve things. Apparently, my system is not really affected by this. Both zoomFactor 1.1 and 1.2 work fine for me. One is a bit faster than the other. With One additional observation: In Windows, there is a setting at "Einstellungen -> Bluetooth und Geräte -> Maus -> Zeilen, die gleichzeitig gescrollt werden sollen" which controls how fast pages are scrolled with a mouse wheel. With |
Leaving |
|
I tried this current changes and there are no big differences for me. It is maybe a little bit faster but no big difference. I did not use this feature very often - until this pull request only once or twice, so my impression could be wrong. |
Fixes #4244 by using option constrainResolution to link mouse wheel "steps" to zoom levels in OpenLayer map of gallery detail view.
Note: I will open backports of this fix for Kitodo
3.9.xand4.0.xonce this pull request is approved